package edu.cuit.avatar.inherit;

/**
 * QQ宠物--企鹅
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/7/9 14:50
 */
public class Penguin extends Pet{
    /**
     * 企鹅特有的属性:性别
     */
    private String gender;

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @Override
    public String sayHello(){
        return super.sayHello() //调用父类的sayHello方法
                + ",我和主人的亲密度是" + getLovely() + ",我是" + ("Male".equals(gender) ? "调皮的" : "可爱的") + "企鹅宝宝";
    }
}
